package ym.ecrm.core.domain.marketManagement;

import java.util.HashSet;
import java.util.Set;

import javassist.expr.NewArray;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import ym.ecrm.core.domain.base.BaseEntity;
import ym.ecrm.core.domain.systemManagement.User;
/**
 * 市场活动类
 * @author fage
 *@version 1.0
 */

@Entity
@Table(name = " t_marketingActivity")
public class MarketingActivity extends BaseEntity {
	/**
	 * activityCode 活动编号
	 */
	private String activityCode;
	/**
	 * theme 主题
	 */
	private String theme;
	/**
	 * marketingPlanning 所属市场计划
	 */
	@ManyToOne(targetEntity = MarketingPlanning.class
			 ,cascade={CascadeType.PERSIST,CascadeType.MERGE})
	@JoinColumn(name = "marketingPlanningId")
	private MarketingPlanning marketingPlanning;
	
	/**
	 *  targetCustomerGroup 目标客户群
	 */
	@ManyToMany(targetEntity = TargetCustomersGroup.class
			,cascade={CascadeType.PERSIST,CascadeType.MERGE})
	@JoinColumn(name = "targetCustomersGroupId")
	private Set<TargetCustomersGroup> targetCustomersGroups = new HashSet<TargetCustomersGroup>();
	/**
	 * activityType 活动类型
	 */
	private String activityType;
	/**
	 * state 状态
	 */
	private String state;
	
	/**
	 * timer 时间
	 */
	private String timer;
	/**
	 * place 地点
	 */
	private String place;
	
	/**
	 * expense 费用
	 */
	private String expense;
	/**
	 * effectAppraisal 效果评估

	 */
	private String effectAppraisal;
	
	/**
	 * summarize 总结
	 */
	private String summarize;
	 /**
	  * user 负责人
	 */
	@ManyToOne(targetEntity = User.class
			,cascade={CascadeType.PERSIST,CascadeType.MERGE})
	@JoinColumn( name = "userId")
	private User user;
	public String getActivityCode() {
		return activityCode;
	}
	public void setActivityCode(String activityCode) {
		this.activityCode = activityCode;
	}
	public String getTheme() {
		return theme;
	}
	public void setTheme(String theme) {
		this.theme = theme;
	}
	
	
	public MarketingPlanning getMarketingPlanning() {
		return marketingPlanning;
	}
	public void setMarketingPlanning(MarketingPlanning marketingPlanning) {
		this.marketingPlanning = marketingPlanning;
	}

	public Set<TargetCustomersGroup> getTargetCustomersGroups() {
		return targetCustomersGroups;
	}
	public void setTargetCustomersGroups(
			Set<TargetCustomersGroup> targetCustomersGroups) {
		this.targetCustomersGroups = targetCustomersGroups;
	}
	public String getActivityType() {
		return activityType;
	}
	public void setActivityType(String activityType) {
		this.activityType = activityType;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getTimer() {
		return timer;
	}
	public void setTimer(String timer) {
		this.timer = timer;
	}
	public String getPlace() {
		return place;
	}
	public void setPlace(String place) {
		this.place = place;
	}
	public String getExpense() {
		return expense;
	}
	public void setExpense(String expense) {
		this.expense = expense;
	}
	public String getEffectAppraisal() {
		return effectAppraisal;
	}
	public void setEffectAppraisal(String effectAppraisal) {
		this.effectAppraisal = effectAppraisal;
	}
	public String getSummarize() {
		return summarize;
	}
	public void setSummarize(String summarize) {
		this.summarize = summarize;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	
	
	
}
